﻿@model List<Logistics.Web.Models.Order.InvoiceModel>

@{
    Layout = null;
}

@if (Model == null || Model.Count == 0)
{
    //+string+
    <div class="window-content space">There is no invoice avaliable.</div>
}
else
{
    <div class="t-widget t-grid">
        <table>
            <thead class="t-grid-header">

                @if (!String.IsNullOrEmpty(ViewBag.DueWarning))
                {
                    <tr>
                        <td colspan="5" class="general-warning">
                            <strong>Reminder:</strong> @ViewBag.DueWarning
                        </td>
                    </tr>
                }

                <tr>
                    <th class="t-header">Date</th>
                    <th class="t-header">Invoice #</th>
                    <th class="t-header">Status</th>
                    <th class="t-header">Invoice Total</th>
                    <th class="t-header">@T("Order.GetPDFInvoice")</th>
                </tr>
            </thead>
            <tbody>

                @foreach (var i in Model)
                {
                    <tr>
                        <td>@i.Date</td>
                        <td>@i.InvoiceNumber</td>
                        <td>@i.InvoiceStatus</td>
                        <td style="text-align:right;padding-right:50px">@i.Amount</td>
                        <td>@Html.ActionLink("Download", "Invoice", new { id = i.Id }, new { @class = "button-grey donwload-link" })</td>
                    </tr>
                }
            </tbody>
        </table>
    </div>
}

